package cn.com.sparkle.paxos.net.systemserver;

import cn.com.sparkle.paxos.config.Configuration;
import cn.com.sparkle.paxos.net.frame.FrameBody;
import cn.com.sparkle.paxos.net.netlayer.PaxosSession;
import cn.com.sparkle.paxos.net.protocolprocessor.Protocol;
import cn.com.sparkle.paxos.net.protocolprocessor.ProtocolManager;
import cn.com.sparkle.paxos.net.protocolprocessor.ProtocolProcessor;
import cn.com.sparkle.paxos.net.protocolprocessor.negotiation.AbstractServerProtocolNegotiationProcessor;

public class SystemServerProtocolNegotiationProcessor extends AbstractServerProtocolNegotiationProcessor {

	public SystemServerProtocolNegotiationProcessor(ProtocolManager protocolManager, Configuration conf) {
		super(protocolManager, conf);
	}

	@Override
	public ProtocolProcessor<FrameBody> getProcessor(String version) {
		ProtocolManager protocolManager = getProtocolManager();
		Protocol protocol = protocolManager.getProtocol(version);
		return protocol.getServerInProcessor();
	}

	@Override
	public void onConnect(PaxosSession session) {
	}

	@Override
	public void onDisConnect(PaxosSession session) {
	}
}
